package com.bupt.cosmfl.cosmflweb.dao;


import com.bupt.cosmfl.cosmflweb.model.NodeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface NodeDao {
    NodeEntity findByNodeId(@Param("nodeId") Integer nodeId);

    int registerNode(@Param("userId") Integer userId, @Param("nodeName") String nodeName, @Param("ip") String ip, @Param("port") String port);

    void deleteNode(@Param("nodeId") Long nodeId);
}
